

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layuiAdmin 文章管理 iframe 框</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../layuiadmin/style/admin.css" media="all">
  <style>
    .layui-form-label{
      width: 120px;
    }
    .layui-form-item .layui-input-inline{
      width: 290px;
    }
  </style>
</head>
<body>
  <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;"> 
    <div class="layui-form-item">
      <label class="layui-form-label">分类显示编号</label>
      <div class="layui-input-inline">
        <input type="text" name="fMcId" lay-verify="required" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">分类显示名称</label>
      <div class="layui-input-inline">
        <input type="text" name="fMcShowName" lay-verify="required"  autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">分类名称</label>
      <div class="layui-input-inline">
        <input type="text" name="fMcName" lay-verify="required" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">是否有子节点</label>
      <div class="layui-input-inline">
        <select name="fHasChild" lay-verify="required">
          <option value="">请选择</option>
          <option value="是">是</option>
          <option value="否">否</option>
        </select>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">备注</label>
      <div class="layui-input-inline">
        <input type="text" name="fMcRemark" lay-verify="required" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item layui-hide">
      <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" value="确认添加">
      <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="确认编辑">
    </div>
  </div>
  <script src='../../layuiadmin/modules/jTools.js'></script>
  <script src="../../layuiadmin/layui/layui.js"></script>  
  <script>
    function initNodeData(node){
      console.log(node);
      layui.use(['form'], function(){
        var $ = layui.$
        ,form = layui.form
        ,formfMcId = jTools.getQuery('fMcId');
        $.ajax({
          url: http_proxy("/materialCaregory/getFMcByFMcId?fMcId=")+ node.nodeId,
          type:'get',
          success:function(data){
            if(data.code = "success"){ 
              fHasChild = data.data.fHasChild === '1' ? "是":"否";
              form.val("layuiadmin-app-form-list", {
              // "fMcId": data.data.fMcId,
              "fMcShowName":data.data.fMcShowName,
              "fMcName":data.data.fMcName,
              "fHasChild":fHasChild,
              "fMcRemark":data.data.fMcRemark
              });
              debugger
              form.render('select');
            }else{
              layer.msg(data.message,{icon:5});
            }
          }
        })
      });
    }
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'form','my_send'], function(){
    var $ = layui.$
    ,form = layui.form
    ,http_proxy = layui.http_proxy
    , my_send = layui.my_send;
  
    //监听提交
  });
  </script>
</body>
</html>